export default {
    install(Vue) {
        if (typeof Vue === 'function') {
            // 显示滚动条
            Vue.prototype.HtmlVisibleScroll = function () {
                let html = document.getElementsByTagName('html')[0];
                let body = document.body;
                html.style.overflow = "visible";
                body.style.overflow = "visible";
            }
            // 隐藏滚动条
            Vue.prototype.HtmlHiddenScroll = function () {
                let html = document.getElementsByTagName('html')[0];
                let body = document.body;
                html.style.overflow = "hidden";
                body.style.overflow = "hidden";
            }
        }else {
            Vue.config.globalProperties.HtmlVisibleScroll = function () {
                let html = document.getElementsByTagName('html')[0];
                let body = document.body;
                html.style.overflow = "visible";
                body.style.overflow = "visible";
            } 
            Vue.config.globalProperties.HtmlHiddenScroll = function () {
                let html = document.getElementsByTagName('html')[0];
                let body = document.body;
                html.style.overflow = "hidden";
                body.style.overflow = "hidden";
            }
        }
    }
}